<?php
$dirList = explode ( '/', $_SERVER ['PHP_SELF'] );
$document_root = $_SERVER ["DOCUMENT_ROOT"];
require "$document_root/$dirList[1]/src/conf/conf.php";

$connMng = new ConnManger ( $db_conf, $mem_conf );
$connPar = $connMng->getConn_parser();

$idArray = $_GET['IdArray'];
$flag = true;

$id_list = "";
foreach ($idArray as $id){
	if($id != 0){
		$record = News_news_info_DAO::getRecord($id, $connPar);
		if ($record == null){
			$flag = false;
			$id_list .= $id.",";
		}	
	}
}
$id_list = rtrim($id_list,",");
$result = "";
if ($flag){
	$result = array(1);
}else{
	$result = array(2,$id_list);
}
echo json_encode($result);
?>